<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="新增贷款信息表" bodyClass="white-bg" libs=["prism","bootstrapSelect","ueditor"]/>
<div class="wrapper wrapper-content ibox-content">
    <@form.form id="form-loan-add"  class="form-horizontal">
    <input name="id" type="hidden" value="${bpmCrmLoan.id}">
    <input name="saleOrderNumber" type="hidden" value="${bpmCrmLoan.saleOrderNumber}">
    <input name="processStatus" value="5" class="form-control" type="hidden">
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "流水号"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmLoan.saleOrderNumber?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "销售员"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmLoan.saleUsername?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "销售订单编号"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmLoan.saleCode?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "车辆识别号"/>：
    </label>
        <div class="col-sm-8"><input name="outCarVin" class="form-control" type="text" value="${bpmCrmLoan.outCarVin?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "车型"/>：
    </label>
        <div class="col-sm-8"><input name="outCarVehicle" class="form-control" type="text" value="${bpmCrmLoan.outCarVehicle?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "申请贷款金额"/>：
    </label>
        <div class="col-sm-8"><input name="loanApplyMoney" class="form-control" type="text" value="${bpmCrmLoan.loanApplyMoney?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "申请备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="loanApplyMemo" class="form-control" readonly="true">${bpmCrmLoan.loanApplyMemo?default('')}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "贷款专员审核"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="loanSpecialistReview" dictType="sys_bpm_crm_passorclose" value="${bpmCrmLoan.loanSpecialistReview?default('')}" readOnly="true" />
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "合同文件"/>：
    </label>
        <div class="col-sm-8">

            <div class="layui-upload">
                <div class="layui-upload-list layui-upList-minHeight uploadpadding">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th>文件名</th>
                            <th>大小</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="demojiazhaoList1">
                        <tr id="upjiazhaoload1"></tr>
                        <#list proof as item>
                        <tr id="upload${item_index}1">
                            <td> ${item.fileName?default("")}</td>
                            <td> ${item.fileSize?default("")}</td>
                            <td>已上传</td>
                            <td>
                                <a class="btn btn-danger btn-sm" href="#" download="${item.url}"><i class="fa fa-download"></i></a>
                            </td>
                        </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "贷款金额"/>：
    </label>
        <div class="col-sm-8"><input name="loanMoney" class="form-control" type="text" value="${bpmCrmLoan.loanMoney?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "职称专员流程"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="loanTitleSpecialistProcess" dictType="sys_bpm_crm_passorclose" value="${bpmCrmLoan.loanTitleSpecialistProcess?default('')}" readOnly="true"/>
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "贷款备注"/>：
    </label>
        <div class="col-sm-8">

            <textarea name="loanFilepath" class="form-control" readonly="true">${bpmCrmLoan.loanFilepath?default('')}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "出纳审核"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="checkmoneyCashierReview" dictType="sys_bpm_crm_passorclose" value="${bpmCrmLoan.checkmoneyCashierReview?default('')}" readOnly="true" />
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "证明"/>：
    </label>
        <div class="col-sm-8">

            <div class="layui-upload">
                <div class="layui-upload-list layui-upList-minHeight uploadpadding">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th>文件名</th>
                            <th>大小</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="demojiazhaoList">
                        <tr id="upjiazhaoload"></tr>
                        <#list proofList as item>
                        <tr id="upload${item_index}">
                            <td> ${item.fileName?default("")}</td>
                            <td> ${item.fileSize?default("")}</td>
                            <td>已上传</td>
                            <td>
                                <a class="btn btn-danger btn-sm" href="#" download="${item.url}"><i class="fa fa-download"></i></a>
                            </td>
                        </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "贷款金额审核"/>：
    </label>
        <div class="col-sm-8"><input name="checkmoneyLoanamountreceived" class="form-control" type="text" value="${bpmCrmLoan.checkmoneyLoanamountreceived?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "收据编号"/>：
    </label>
        <div class="col-sm-8"><input name="checkmoneyReceiptnumber" class="form-control" type="text" value="${bpmCrmLoan.checkmoneyReceiptnumber?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "出纳备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="checkmoneyMemo" class="form-control" readonly="true">${bpmCrmLoan.checkmoneyMemo?default('')}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "订单生效日"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control" name="orderTakeEffectTime"  data-type="date" data-format="yyyy-MM-dd" type="text" value="${(bpmCrmLoan.orderTakeEffectTime?string('yyyy-MM-dd'))!}" readonly="true"/>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "收款日"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control" name="collectionTime"  data-type="date" data-format="yyyy-MM-dd" type="text"  value="${(bpmCrmLoan.collectionTime?string('yyyy-MM-dd'))!}" readonly="true"/>
            </div>
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "间隔日"/>：
    </label>
        <div class="col-sm-8"><input name="intervalDay" class="form-control" type="number"  value="${bpmCrmLoan.intervalDay?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "利息率"/>：
    </label>
        <div class="col-sm-8"><input name="interestRate" class="form-control" type="number" value="${bpmCrmLoan.interestRate?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "资金成本"/>：
    </label>
        <div class="col-sm-8"><input name="costOfCapital" class="form-control" type="number"  value="${bpmCrmLoan.costOfCapital?default('')}" readonly="true">
        </div>
    </div>
    <#if bpmCrmLoan.processStatus==4 >
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "财务经理审核"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="financeManagerReview" dictType="sys_bpm_crm_passorclose" value="${bpmCrmLoan.financeManagerReview?default('1')}" />
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "经理复核" />：
        </label>
        <div class="col-sm-8"><input name="managerReview" class="form-control" type="text"  required>
        </div>
    </div>
</#if>
<#if bpmCrmLoan.processStatus!=4 >


<div class="form-group">
    <label class="col-sm-3 control-label"><@ctx.i18n text = "财务经理审核"/>：</label>
    <div class="col-sm-8">
        <@form.radio name="financeManagerReview" dictType="sys_bpm_crm_passorclose" value="${bpmCrmLoan.financeManagerReview?default('')}" readOnly="true" />
    </div>
</div>
<div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "经理复核"/>：
</label>
    <div class="col-sm-8"><input name="managerReview" class="form-control" type="text" value="${bpmCrmLoan.managerReview?default('')}" readonly="true">
    </div>
</div>
</#if>
</@form.form>
</div>
<@footer>
<script type="text/javascript">
    var prefix = baseURL + "bpm/loan"
    $("#form-loan-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if (opt.validate.form()) {
            opt.operate.save(prefix + "/edit", $('#form-loan-add').serialize());
        }
    }
    function isNullOrEmpty(value) {
        return value==''||value==null||value==undefined;
    }
</script>
</@footer>
</@pageTheme>